package com.tuyue.police.enums;

/**
 * 错误码枚举
 * Created by Administrator on 2017/5/25.
 */
public enum ResultEnum {

    UNKONW_ERROR(-1, "未知错误"),
    SMS_SERVERERROR(3,"短信服务器异常"),
    SMS_SENDERROR(4,"短信发送失败"),
    SMS_CODEERROR(5,"验证码错误"),
    SMS_CODEPAST(6,"验证码已过期"),
    SMS_TELERROR(7,"手机号不正确"),
    SMS_TELNOTNULL(8,"手机号不能为空"),

    USER_ERROR(10, "用户不存在"),
    USER_NOTNULL(11,"用户不能为空"),
    USER_USERNAMENOTNULL(12, "用户名不能为空"),
    USER_USERNAMEISEXISTS(13, "用户已存在"),
    USER_PASSWORDERROR(14, "密码错误"),
    USER_PASSWORDNOTNULL(15, "密码不能为空"),
    USER_TYPENOTNULL(16, "用户类型不能为空"),
    USER_TYPE_ERROR(17, "用户类型异常"),

    ENTERPRISE_ERROR(20,"企业不存在"),
    ENTERPRISE_NOTNULL(21, "企业不能为空"),

    RULE_ERROR(30,"分发规则不存在"),

    DISPENSEWAY_NOTNULL(40,"转发方式不能为空"),


    SECTOR_NOTNULL(50,"防区不能为空"),
    SECTOR_ERROR(51, "防区不存在"),
    SECTOR_DELERROR(52, "防区下有规则，不能删除"),

    FACILITY_EXISTS(60,"设备没有绑定企业"),
    FACILITY_ISNOTEXIST(61,"设备不存在"),


    YS_DEVICE_DEFEATADD(70, "添加设备失败"),
    YS_DEVICE_DEFEATSETACCESS(71, "授权失败"),
    YS_DEVICE_DEFEATDELETE(72, "删除设备失败"),
    YS_DEVICE_DEFEATDELETEACCESS(73, "删除权限失败"),

    YS_SERVER_ERROR(90,"连接萤石服务器异常"),
    FACILITY_ERROR(9,"设备不存在"),
    BSERVER_NOTNULL(10, "服务器不能为空"),
    BSERVER_ERROR(11, "服务器不存在"),
    NOTNULL(12, "参数不能为空"),
    NOFILE_ERROR(13,"上传文件失败"),
    FILENULL(14,"文件不能为空")


    ;



    private Integer code;
    private String msg;

    ResultEnum() {
    }

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
